]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Use DesktopAppInfo from GioUnix
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Sun, 31 Aug 2025 00:55:13 +0000 (02:55 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Sep 2025 12:24:50 +0000 (12:24 +0000)
The type was never part of Gio, but it's an Unix specific type, so use
the platform-specific typelib instead.

This would still work in gjs for 49 but would trigger a warning.

See: https://gitlab.gnome.org/GNOME/glib/-/issues/3744
See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4761
See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/1018
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3855>

js/misc/parentalControlsManager.js
js/ui/main.js
js/ui/remoteSearch.js

index cd5353154b506e97cca55a21f8cc516dc7ac143f..55ffed24678f3250516fc7a9b9fd10df6580df22 100644 (file)
@@ -127,7 +127,7 @@ const ParentalControlsManager = GObject.registerClass({
         return this._initialized;
     }
 
-    // Calculate whether the given app (a Gio.DesktopAppInfo) should be shown
+    // Calculate whether the given app (a GioUnix.DesktopAppInfo) should be shown
     // on the desktop, in search results, etc. The app should be shown if:
     //  - The .desktop file doesn’t say it should be hidden.
     //  - The executable from the .desktop file’s Exec line isn’t denied in
index 0de79d6a17a6e66f7437e840c504d3da83308632..40898e15c23d2aa998889feb4d3b7721351f3fb8 100644 (file)
@@ -1,5 +1,6 @@
 import Clutter from 'gi://Clutter';
 import Gio from 'gi://Gio';
+import GioUnix from 'gi://GioUnix';
 import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
 import Meta from 'gi://Meta';
@@ -169,7 +170,7 @@ export async function start() {
 
     let currentDesktop = GLib.getenv('XDG_CURRENT_DESKTOP');
     if (!currentDesktop || !currentDesktop.split(':').includes('GNOME'))
-        Gio.DesktopAppInfo.set_desktop_env('GNOME');
+        GioUnix.DesktopAppInfo.set_desktop_env('GNOME');
 
     sessionMode = new SessionMode.SessionMode();
     sessionMode.connect('updated', _sessionUpdated);
index dbd0494ec2d47baf282ea99ca62f4f85eae9d6e3..b7247cab525161eac019bdf74802af5eccc45413 100644 (file)
@@ -1,5 +1,6 @@
 import GdkPixbuf from 'gi://GdkPixbuf';
 import Gio from 'gi://Gio';
+import GioUnix from 'gi://GioUnix';
 import GLib from 'gi://GLib';
 import Shell from 'gi://Shell';
 import St from 'gi://St';
@@ -96,7 +97,7 @@ export function loadRemoteSearchProviders(searchSettings) {
             let appInfo = null;
             try {
                 let desktopId = keyfile.get_string(group, 'DesktopId');
-                appInfo = Gio.DesktopAppInfo.new(desktopId);
+                appInfo = GioUnix.DesktopAppInfo.new(desktopId);
                 if (!appInfo.should_show())
                     return;
             } catch {